package tech.lithum.mm.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import java.util.List;

import tech.lithum.mm.R;

public class UsersAdapter extends ArrayAdapter<User> {
//    private List<User> users;
//
//    public void setUsers(List<User> users) {
//        this.users = users;
//        notifyDataSetChanged();
//    }

    public UsersAdapter(Context context, List<User> users) {
        super(context, 0, users);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        User user = getItem(position);
        if(convertView == null) {
            convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_item, parent, false);
        }

//        TextView tvName = (TextView) convertView.findViewById(R.id.userLvItemTV);
//        tvName.setText(user.getName());
        return convertView;
    }
}
